import request from '@/utils/request'

/**
 * 获取结算信息
 */
export const findCheckoutInfoAPI = () => {
  return request('/member/order/pre', 'get')
}

/**
 * 添加收货地址信息
 * @param {Object} address - 地址对象
 */
export const addAddressAPI = (address) => {
  return request('/member/address', 'post', address)
}

/**
 * 编辑收货地址信息
 * @param {Object} address - 地址对象
 */
export const editAddressAPI = (address) => {
  return request(`/member/address/${address.id}`, 'put', address)
}
